home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-07-26 | 2.1 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: StringToDateAndSecs.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Wed Jul 26 04:12:26 1995, modified Wed Jul 26 04:12:26 1995, creator 'CWIE', type ASCII, 1493 bytes "StringToDateAndSecs.c" , at 0x655 456 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 15 53 74 72 69 6e 67 | 54 6f 44 61 74 65 41 6e |..String|ToDateAn|
|00000010| 64 53 65 63 73 2e 63 00 | 00 00 00 00 00 00 00 00 |dSecs.c.|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 05 d5 00 | 00 01 c8 ac 3b a9 6a ac |........|....;.j.|
|00000060| 3b a9 6a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |;.j.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 a5 de 00 00 |........|........|
|00000080| 2f 2a 0d 53 74 72 69 6e | 67 54 6f 44 61 74 65 41 |/*.Strin|gToDateA|
|00000090| 6e 64 53 65 63 73 2e 63 | 0d 52 65 61 64 73 20 64 |ndSecs.c|.Reads d|
|000000a0| 61 74 65 20 73 75 63 68 | 20 61 73 20 22 36 2f 33 |ate such| as "6/3|
|000000b0| 30 2f 39 31 22 2c 20 6c | 6f 61 64 73 20 64 61 74 |0/91", l|oads dat|
|000000c0| 65 20 73 74 72 75 63 74 | 75 72 65 2c 20 61 6e 64 |e struct|ure, and|
|000000d0| 20 72 65 74 75 72 6e 73 | 20 73 65 63 73 20 73 69 | returns| secs si|
|000000e0| 6e 63 65 20 31 2f 31 2f | 31 39 30 34 2e 0d 52 65 |nce 1/1/|1904..Re|
|000000f0| 74 75 72 6e 73 20 4e 41 | 4e 20 69 66 20 64 61 74 |turns NA|N if dat|
|00000100| 65 20 63 6f 75 6c 64 20 | 6e 6f 74 20 62 65 20 72 |e could |not be r|
|00000110| 65 61 64 2e 0d 0d 0d 48 | 49 53 54 4f 52 59 3a 0d |ead....H|ISTORY:.|
|00000120| 37 2f 32 37 2f 39 31 20 | 64 67 70 09 77 72 6f 74 |7/27/91 |dgp.wrot|
|00000130| 65 20 69 74 0d 38 2f 35 | 2f 39 31 09 64 67 70 09 |e it.8/5|/91.dgp.|
|00000140| 6d 61 64 65 20 63 6f 6d | 70 61 74 69 62 6c 65 20 |made com|patible |
|00000150| 77 69 74 68 20 4d 50 57 | 20 43 20 33 2e 32 0d 38 |with MPW| C 3.2.8|
|00000160| 2f 32 34 2f 39 31 09 64 | 67 70 09 4d 61 64 65 20 |/24/91.d|gp.Made |
|00000170| 63 6f 6d 70 61 74 69 62 | 6c 65 20 77 69 74 68 20 |compatib|le with |
|00000180| 54 48 49 4e 4b 20 43 20 | 35 2e 30 2e 0d 31 32 2f |THINK C |5.0..12/|
|00000190| 31 33 2f 39 32 20 64 67 | 70 20 52 65 6d 6f 76 65 |13/92 dg|p Remove|
|000001a0| 64 20 6f 62 73 6f 6c 65 | 74 65 20 73 75 70 70 6f |d obsole|te suppo|
|000001b0| 72 74 20 66 6f 72 20 54 | 48 49 4e 4b 20 43 20 34 |rt for T|HINK C 4|
|000001c0| 2e 0d 35 2f 32 38 2f 39 | 34 20 64 67 70 20 52 65 |..5/28/9|4 dgp Re|
|000001d0| 6e 61 6d 65 64 20 66 72 | 6f 6d 20 22 53 74 72 69 |named fr|om "Stri|
|000001e0| 6e 67 54 6f 44 61 74 65 | 22 20 74 6f 20 22 53 74 |ngToDate|" to "St|
|000001f0| 72 69 6e 67 54 6f 44 61 | 74 65 41 6e 64 53 65 63 |ringToDa|teAndSec|
|00000200| 73 22 20 74 6f 20 61 76 | 6f 69 64 0d 63 6f 6e 66 |s" to av|oid.conf|
|00000210| 6c 69 63 74 20 77 69 74 | 68 20 41 70 70 6c 65 27 |lict wit|h Apple'|
|00000220| 73 20 6e 65 77 20 55 6e | 69 76 65 72 73 61 6c 20 |s new Un|iversal |
|00000230| 48 65 61 64 65 72 73 2e | 20 54 68 61 6e 6b 73 20 |Headers.| Thanks |
|00000240| 74 6f 20 42 6f 62 20 44 | 6f 75 67 68 65 72 74 79 |to Bob D|ougherty|
|00000250| 20 0d 28 77 6f 6c 66 67 | 61 6e 67 40 63 61 74 73 | .(wolfg|ang@cats|
|00000260| 2e 75 63 73 63 2e 65 64 | 75 29 20 66 6f 72 20 72 |.ucsc.ed|u) for r|
|00000270| 65 70 6f 72 74 69 6e 67 | 20 74 68 65 20 69 6e 63 |eporting| the inc|
|00000280| 6f 6d 70 61 74 69 62 69 | 6c 69 74 79 2e 0d 2a 2f |ompatibi|lity..*/|
|00000290| 0d 23 69 6e 63 6c 75 64 | 65 20 22 56 69 64 65 6f |.#includ|e "Video|
|000002a0| 54 6f 6f 6c 62 6f 78 2e | 68 22 0d 2f 2f 23 69 6e |Toolbox.|h".//#in|
|000002b0| 63 6c 75 64 65 20 3c 53 | 63 72 69 70 74 2e 68 3e |clude <S|cript.h>|
|000002c0| 0d 64 6f 75 62 6c 65 20 | 53 74 72 69 6e 67 54 6f |.double |StringTo|
|000002d0| 44 61 74 65 41 6e 64 53 | 65 63 73 28 63 68 61 72 |DateAndS|ecs(char|
|000002e0| 20 2a 73 74 72 69 6e 67 | 2c 44 61 74 65 54 69 6d | *string|,DateTim|
|000002f0| 65 52 65 63 20 2a 64 61 | 74 65 50 74 72 29 3b 0d |eRec *da|tePtr);.|
|00000300| 0d 64 6f 75 62 6c 65 20 | 53 74 72 69 6e 67 54 6f |.double |StringTo|
|00000310| 44 61 74 65 41 6e 64 53 | 65 63 73 28 63 68 61 72 |DateAndS|ecs(char|
|00000320| 20 2a 73 74 72 69 6e 67 | 2c 44 61 74 65 54 69 6d | *string|,DateTim|
|00000330| 65 52 65 63 20 2a 64 61 | 74 65 50 74 72 29 0d 7b |eRec *da|tePtr).{|
|00000340| 0d 09 4c 6f 6e 67 44 61 | 74 65 52 65 63 20 6c 6f |..LongDa|teRec lo|
|00000350| 6e 67 44 61 74 65 3b 0d | 09 4c 6f 6e 67 44 61 74 |ngDate;.|.LongDat|
|00000360| 65 43 76 74 20 6c 6f 6e | 67 53 65 63 73 3b 0d 09 |eCvt lon|gSecs;..|
|00000370| 64 6f 75 62 6c 65 20 73 | 65 63 73 3b 0d 09 73 74 |double s|ecs;..st|
|00000380| 61 74 69 63 20 44 61 74 | 65 43 61 63 68 65 52 65 |atic Dat|eCacheRe|
|00000390| 63 6f 72 64 20 74 68 65 | 43 61 63 68 65 3b 0d 09 |cord the|Cache;..|
|000003a0| 73 74 61 74 69 63 20 42 | 6f 6f 6c 65 61 6e 20 66 |static B|oolean f|
|000003b0| 69 72 73 74 54 69 6d 65 | 3d 31 3b 0d 09 69 6e 74 |irstTime|=1;..int|
|000003c0| 20 65 72 72 6f 72 3b 0d | 09 6c 6f 6e 67 20 75 73 | error;.|.long us|
|000003d0| 65 64 3b 0d 09 0d 09 6c | 6f 6e 67 44 61 74 65 2e |ed;....l|ongDate.|
|000003e0| 6c 64 2e 65 72 61 3d 6c | 6f 6e 67 44 61 74 65 2e |ld.era=l|ongDate.|
|000003f0| 6c 64 2e 79 65 61 72 3d | 6c 6f 6e 67 44 61 74 65 |ld.year=|longDate|
|00000400| 2e 6c 64 2e 6d 6f 6e 74 | 68 3d 6c 6f 6e 67 44 61 |.ld.mont|h=longDa|
|00000410| 74 65 2e 6c 64 2e 64 61 | 79 3d 30 3b 0d 09 6c 6f |te.ld.da|y=0;..lo|
|00000420| 6e 67 44 61 74 65 2e 6c | 64 2e 68 6f 75 72 3d 6c |ngDate.l|d.hour=l|
|00000430| 6f 6e 67 44 61 74 65 2e | 6c 64 2e 6d 69 6e 75 74 |ongDate.|ld.minut|
|00000440| 65 3d 6c 6f 6e 67 44 61 | 74 65 2e 6c 64 2e 73 65 |e=longDa|te.ld.se|
|00000450| 63 6f 6e 64 3d 6c 6f 6e | 67 44 61 74 65 2e 6c 64 |cond=lon|gDate.ld|
|00000460| 2e 64 61 79 4f 66 57 65 | 65 6b 3d 30 3b 0d 09 69 |.dayOfWe|ek=0;..i|
|00000470| 66 28 66 69 72 73 74 54 | 69 6d 65 29 7b 0d 09 09 |f(firstT|ime){...|
|00000480| 49 6e 69 74 44 61 74 65 | 43 61 63 68 65 28 26 74 |InitDate|Cache(&t|
|00000490| 68 65 43 61 63 68 65 29 | 3b 0d 09 09 66 69 72 73 |heCache)|;...firs|
|000004a0| 74 54 69 6d 65 3d 30 3b | 0d 09 7d 0d 09 65 72 72 |tTime=0;|..}..err|
|000004b0| 6f 72 3d 53 74 72 69 6e | 67 32 44 61 74 65 28 73 |or=Strin|g2Date(s|
|000004c0| 74 72 69 6e 67 2c 73 74 | 72 6c 65 6e 28 73 74 72 |tring,st|rlen(str|
|000004d0| 69 6e 67 29 2c 26 74 68 | 65 43 61 63 68 65 2c 26 |ing),&th|eCache,&|
|000004e0| 75 73 65 64 2c 26 6c 6f | 6e 67 44 61 74 65 29 3b |used,&lo|ngDate);|
|000004f0| 0d 09 2a 64 61 74 65 50 | 74 72 3d 6c 6f 6e 67 44 |..*dateP|tr=longD|
|00000500| 61 74 65 2e 6f 64 2e 6f | 6c 64 44 61 74 65 3b 0d |ate.od.o|ldDate;.|
|00000510| 09 69 66 28 65 72 72 6f | 72 29 72 65 74 75 72 6e |.if(erro|r)return|
|00000520| 20 4e 41 4e 3b 0d 09 4c | 6f 6e 67 44 61 74 65 32 | NAN;..L|ongDate2|
|00000530| 53 65 63 73 28 26 6c 6f | 6e 67 44 61 74 65 2c 28 |Secs(&lo|ngDate,(|
|00000540| 4c 6f 6e 67 44 61 74 65 | 54 69 6d 65 20 2a 29 26 |LongDate|Time *)&|
|00000550| 6c 6f 6e 67 53 65 63 73 | 29 3b 0d 09 73 65 63 73 |longSecs|);..secs|
|00000560| 3d 48 69 57 6f 72 64 28 | 6c 6f 6e 67 53 65 63 73 |=HiWord(|longSecs|
|00000570| 2e 68 6c 2e 6c 48 69 67 | 68 29 3b 0d 09 73 65 63 |.hl.lHig|h);..sec|
|00000580| 73 2a 3d 28 64 6f 75 62 | 6c 65 29 30 78 31 30 30 |s*=(doub|le)0x100|
|00000590| 30 30 3b 0d 09 73 65 63 | 73 2b 3d 28 75 6e 73 69 |00;..sec|s+=(unsi|
|000005a0| 67 6e 65 64 29 4c 6f 57 | 6f 72 64 28 6c 6f 6e 67 |gned)LoW|ord(long|
|000005b0| 53 65 63 73 2e 68 6c 2e | 6c 48 69 67 68 29 3b 0d |Secs.hl.|lHigh);.|
|000005c0| 09 73 65 63 73 2a 3d 28 | 64 6f 75 62 6c 65 29 30 |.secs*=(|double)0|
|000005d0| 78 31 30 30 30 30 3b 0d | 09 73 65 63 73 2b 3d 28 |x10000;.|.secs+=(|
|000005e0| 75 6e 73 69 67 6e 65 64 | 29 48 69 57 6f 72 64 28 |unsigned|)HiWord(|
|000005f0| 6c 6f 6e 67 53 65 63 73 | 2e 68 6c 2e 6c 4c 6f 77 |longSecs|.hl.lLow|
|00000600| 29 3b 0d 09 73 65 63 73 | 2a 3d 28 64 6f 75 62 6c |);..secs|*=(doubl|
|00000610| 65 29 30 78 31 30 30 30 | 30 3b 0d 09 73 65 63 73 |e)0x1000|0;..secs|
|00000620| 2b 3d 28 75 6e 73 69 67 | 6e 65 64 29 4c 6f 57 6f |+=(unsig|ned)LoWo|
|00000630| 72 64 28 6c 6f 6e 67 53 | 65 63 73 2e 68 6c 2e 6c |rd(longS|ecs.hl.l|
|00000640| 4c 6f 77 29 3b 0d 09 72 | 65 74 75 72 6e 20 73 65 |Low);..r|eturn se|
|00000650| 63 73 3b 0d 7d 00 00 00 | 00 00 00 00 00 00 00 00 |cs;.}...|........|
|00000660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000680| 00 00 01 00 00 00 01 76 | 00 00 00 76 00 00 00 52 |.......v|...v...R|
|00000690| 00 00 16 97 0b 54 69 6d | 65 56 69 64 65 6f 2e b9 |.....Tim|eVideo..|
|000006a0| 02 00 02 00 50 52 4f 4a | 4b 41 48 4c 01 00 00 14 |....PROJ|KAHL....|
|000006b0| 15 53 74 72 69 6e 67 54 | 6f 44 61 74 65 41 6e 64 |.StringT|oDateAnd|
|000006c0| 53 65 63 73 2e 63 02 00 | 00 00 54 45 58 54 43 57 |Secs.c..|..TEXTCW|
|000006d0| 00 00 54 45 58 54 43 57 | 49 45 01 00 00 64 05 a0 |..TEXTCW|IE...d..|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 aa 0c 3f 36 00 00 | 05 d5 00 00 01 c8 00 00 |....?6..|........|
|00000700| 00 00 00 00 00 00 16 00 | 00 00 16 97 10 54 69 6d |........|.....Tim|
|00000710| 65 56 69 64 65 6f 2e b9 | 2e 72 73 72 63 6d 02 00 |eVideo..|.rsrcm..|
|00000720| 00 00 72 73 72 63 52 53 | 45 44 01 00 00 28 01 20 |..rsrcRS|ED...(. |
|00000730| 00 00 00 00 16 c9 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 06 e8 00 00 | 26 00 a7 7b bd ba a9 5a |........|&..{...Z|
|00000750| 50 1b 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |P.......|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 62 74 00 01 | 00 00 00 00 00 00 00 00 |....bt..|........|
|00000780| 00 00 00 1e 00 01 00 00 | 02 87 00 00 02 9a 13 53 |........|.......S|
|00000790| 74 72 69 6e 67 54 6f 44 | 61 74 65 41 6e 64 53 65 |tringToD|ateAndSe|
|000007a0| 63 73 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |cs...H..|Monaco..|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 41 00 09 |........|.....A..|
|000007d0| 01 8c 02 7c 00 41 00 09 | 01 8c 02 7c ac 3b 71 2e |...|.A..|...|.;q.|
|000007e0| 00 00 02 2d 00 00 02 2d | 00 00 00 97 00 00 00 00 |...-...-|........|
|000007f0| 00 04 00 01 00 01 00 00 | 01 00 00 00 01 76 00 00 |........|.....v..|
|00000800| 00 76 00 00 00 52 01 89 | 2f e8 1a d0 00 00 00 1c |.v...R..|/.......|
|00000810| 00 52 00 01 4d 50 53 52 | 00 01 00 12 4d 57 42 42 |.R..MPSR|....MWBB|
|00000820| 00 00 00 2a 03 ef ff ff | 00 00 00 00 00 00 00 00 |...*....|........|
|00000830| 03 ed ff ff 00 00 00 22 | 00 00 00 00 03 f0 ff ff |......."|........|
|00000840| 00 00 00 6e 00 00 00 00 | 00 00 00 00 00 00 00 00 |...n....|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+